/**
 * bootstrap validator plugins
 */
(function() {
	'use strick',
	require.config({
		paths: {
			"bootstrap.validator": "bootstrap/extends/bootstrap-validator/0.5.3/js/bootstrapValidator.min",
			"bootstrap.validator.zh-CN": "bootstrap/extends/bootstrap-validator/0.5.3/js/language/zh_CN.min",
		},
		shim: {
			"bootstrap.validator": {
				deps : [
				   "jquery", 
				   "css!bootstrap/extends/bootstrap-validator/0.5.3/css/bootstrapValidator.min.css"
				],
				exports:"jQuery.fn.bootstrapValidator"
			},
			"bootstrap.validator.zh-CN": {deps : ["bootstrap.validator"]},
		}
	});
	
	define(['bootstrap.validator','bootstrap.validator.zh-CN'],function(){
		return {
			validate:function(elem, options){
				return elem.bootstrapValidator(options).data('bootstrapValidator').validate().isValid();
			}
		}
	});
})(this);
